#ifndef BASEFORM_H
#define BASEFORM_H

#include <QWidget>
#include <QMainWindow>
#include <QToolBar>
#include <functional>
#include <iostream>
#include <QThread>

using namespace std;

namespace Ui {
class BaseForm;
}

class BaseForm : public QMainWindow
{
    Q_OBJECT

public:
    explicit BaseForm(QMainWindow *parent = 0);
    virtual ~BaseForm();


    void setCallback(std::function<void(const QString&)> _callback);
    void setCallback2000(std::function<void(const QString&)> _callback);
protected:
    QToolBar *mymenu;

    QAction* returnAction;
    QAction* dataMgrAction;

    QAction* printAction;
    std::function<void(const QString&)> callback;
    std::function<void(const QString&)> callback2000;

    virtual void initWindow() = 0;

private:
    Ui::BaseForm *ui;

    void addTools();


};

#endif // BASEFORM_H
